﻿using NORM.SQLObject;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using NORM.DataBase;

namespace NORM.Test
{
    public partial class 生成Model : Form
    {
        public 生成Model()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                string sb = string.Empty;
                var db = DataBaseFactory.Create();
                //Generator.BuildEntity(db, "V_Accounts", "NORM.Models", out sb, DataBaseSchema.View);
                Generator.BuildEntity(db, "T_Accounts", "NORM.Models", out sb);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
           
        }
    }
}
